package day0414;

public class Test10 {
    public static String Format(String Name) {
        int lastpoint = Name.lastIndexOf('.');
        return Name.substring(lastpoint + 1);
    }

    public static void main(String[] args) {
        String Name = "example.jpg";
        System.out.println("图片 " + Name + " 的格式是: " + Format(Name));
    }
}